home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / ctutor.arc / CHAROUT.C < prev    next >
Text File  |  1988-02-28  |  512b  |  17 lines

  1. #include "stdio.h"
  2. main()
  3. {
  4. FILE *point;
  5. char others[35];
  6. int indexer,count;
  7.  
  8.    strcpy(others,"Additional lines.");
  9.    point = fopen("tenlines.txt","a"); /* open for appending */
  10.  
  11.    for (count = 1;count <= 10;count++) {
  12.       for (indexer = 0;others[indexer];indexer++)
  13.          putc(others[indexer],point);  /* output a single character */
  14.       putc('\n',point);                /* output a linefeed */
  15.    }
  16.    fclose(point);
  17. }